<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<script type="text/javascript">
			var student1 = new Object();
			student1.name = "张三";
			student1.age = 19;
			student1.show = function() {
				document.write(this.name + "," + this.age);
			};

			var student2 = {
				name: "李四",
				age: 20,
				show: function() {
					document.write(this.name + "," + this.age);
				}
			};

			var stus = [student1, student2];
			stus.forEach(s => {
				s.show();
				document.write("<br/>");
			});
		</script>
	</body>
</html>
